<%@page import="com.situ.personal.entity.Department"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>

<body>
	<%
		List<Department> list = (List<Department>)request.getAttribute("list");
	%>
	<form action="<%=request.getContextPath()%>/user?method=insert" method="post">
		名字：<input type="text" name="name"/><br/>
		年龄：<input type="text" name="age"/><br/>
		密码：<input type="text" name="password"/><br/>
		邮箱：<input type="text" name="email"/><br/>
		<!-- List<Department> list  -->
		部门：<select name="departmentId">
				<%
					for(Department department : list) {
				%>
						<option value="<%=department.getId()%>"><%=department.getName()%></option>
				<%
					}
				%>
			  </select>
		<br/>
		<input type="submit" value="添加"/>
	</form>
</body>
</html>